﻿<!doctype html>
<html>
 <head>
  <title>登录</title>
  <meta charset="utf-8"/>
  <style>
	#login{width:550px;height:300px;border:3px solid #80ff80;background:#66ff00;margin-left:600px;margin-top:200px;border-radius:15px;}
	td{font-size:1.8em;}
	.sp{display:inline-block;border:0px solid red;width:80px;height:30px;font-size:20px;}
  </style>
 </head>

 <body>
<div id="login">
	<form action="do_syslogin.php" method="get" id="form" onsubmit="return check();">
	<table width="500px" border=0 cellspacing=0 height="300px">
	<tr>
		<td align="center">用户名:</td>
		<td align="center"><input type="text" name="usname" value="" style="width:300px;height:40px;border:2px solid #9c9c9c;"><font color="red">*</font><span id="tip_u" class="sp"></span></td></td>
	</tr>
		<tr>
			<td align="center">密码:</td>
			<td align="center"><input type="password" name="pass" value="" style="width:300px;height:40px;border:2px solid #9c9c9c;"><font color="red">*</font><span id="tip_p" class="sp"></span></td></td>
		</tr>
		<tr>
			<td></td>
			<td align="center"><input type="submit" name="sub" value="登录" style="width:140px;height:50px;background:#ffcc00;font-size:1.1em;"></td>
		</tr>
		
	</table>
		

	</form>
</div>
 </body>
 <script type="text/javascript">
	tip_u=document.getElementById("tip_u");
	tip_p=document.getElementById("tip_p");
		form.usname.onblur=function()
		{
			if(form.usname.value=="")
			{
				tip_u.style.color="red";
				tip_u.innerHTML="不能为空";
			}
		}
		form.pass.onblur=function()
		{
			if(form.pass.value=="")
			{
				tip_p.style.color="red";
				tip_p.innerHTML="不能为空";
			}
		}
	function check()
	{
		if(form.usname.value==""||form.pass.value=="")
		{
			alert("用户名和密码不能为空");
			return false;
		}
		return true;
	}
</script>
</html>
